{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "os.chdir(r'C:\\Users\\86178\\Desktop\\Anime Recommendations Database')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "df=pd.read_csv('anime.csv',encoding='utf-8',dtype={'name':str})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>anime_id</th>\n",
       "      <th>name</th>\n",
       "      <th>genre</th>\n",
       "      <th>type</th>\n",
       "      <th>episodes</th>\n",
       "      <th>rating</th>\n",
       "      <th>members</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>32281</td>\n",
       "      <td>Kimi no Na wa.</td>\n",
       "      <td>Drama, Romance, School, Supernatural</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>9.37</td>\n",
       "      <td>200630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5114</td>\n",
       "      <td>Fullmetal Alchemist: Brotherhood</td>\n",
       "      <td>Action, Adventure, Drama, Fantasy, Magic, Mili...</td>\n",
       "      <td>TV</td>\n",
       "      <td>64</td>\n",
       "      <td>9.26</td>\n",
       "      <td>793665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28977</td>\n",
       "      <td>Gintama°</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>TV</td>\n",
       "      <td>51</td>\n",
       "      <td>9.25</td>\n",
       "      <td>114262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9253</td>\n",
       "      <td>Steins;Gate</td>\n",
       "      <td>Sci-Fi, Thriller</td>\n",
       "      <td>TV</td>\n",
       "      <td>24</td>\n",
       "      <td>9.17</td>\n",
       "      <td>673572</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9969</td>\n",
       "      <td>Gintama&amp;#039;</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>TV</td>\n",
       "      <td>51</td>\n",
       "      <td>9.16</td>\n",
       "      <td>151266</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>32935</td>\n",
       "      <td>Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...</td>\n",
       "      <td>Comedy, Drama, School, Shounen, Sports</td>\n",
       "      <td>TV</td>\n",
       "      <td>10</td>\n",
       "      <td>9.15</td>\n",
       "      <td>93351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11061</td>\n",
       "      <td>Hunter x Hunter (2011)</td>\n",
       "      <td>Action, Adventure, Shounen, Super Power</td>\n",
       "      <td>TV</td>\n",
       "      <td>148</td>\n",
       "      <td>9.13</td>\n",
       "      <td>425855</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>820</td>\n",
       "      <td>Ginga Eiyuu Densetsu</td>\n",
       "      <td>Drama, Military, Sci-Fi, Space</td>\n",
       "      <td>OVA</td>\n",
       "      <td>110</td>\n",
       "      <td>9.11</td>\n",
       "      <td>80679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>15335</td>\n",
       "      <td>Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>9.10</td>\n",
       "      <td>72534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>15417</td>\n",
       "      <td>Gintama&amp;#039;: Enchousen</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>TV</td>\n",
       "      <td>13</td>\n",
       "      <td>9.11</td>\n",
       "      <td>81109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>4181</td>\n",
       "      <td>Clannad: After Story</td>\n",
       "      <td>Drama, Fantasy, Romance, Slice of Life, Supern...</td>\n",
       "      <td>TV</td>\n",
       "      <td>24</td>\n",
       "      <td>9.06</td>\n",
       "      <td>456749</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>28851</td>\n",
       "      <td>Koe no Katachi</td>\n",
       "      <td>Drama, School, Shounen</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>9.05</td>\n",
       "      <td>102733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>918</td>\n",
       "      <td>Gintama</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>TV</td>\n",
       "      <td>201</td>\n",
       "      <td>9.04</td>\n",
       "      <td>336376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2904</td>\n",
       "      <td>Code Geass: Hangyaku no Lelouch R2</td>\n",
       "      <td>Action, Drama, Mecha, Military, Sci-Fi, Super ...</td>\n",
       "      <td>TV</td>\n",
       "      <td>25</td>\n",
       "      <td>8.98</td>\n",
       "      <td>572888</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>28891</td>\n",
       "      <td>Haikyuu!! Second Season</td>\n",
       "      <td>Comedy, Drama, School, Shounen, Sports</td>\n",
       "      <td>TV</td>\n",
       "      <td>25</td>\n",
       "      <td>8.93</td>\n",
       "      <td>179342</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>199</td>\n",
       "      <td>Sen to Chihiro no Kamikakushi</td>\n",
       "      <td>Adventure, Drama, Supernatural</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>8.93</td>\n",
       "      <td>466254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>23273</td>\n",
       "      <td>Shigatsu wa Kimi no Uso</td>\n",
       "      <td>Drama, Music, Romance, School, Shounen</td>\n",
       "      <td>TV</td>\n",
       "      <td>22</td>\n",
       "      <td>8.92</td>\n",
       "      <td>416397</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>24701</td>\n",
       "      <td>Mushishi Zoku Shou 2nd Season</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>TV</td>\n",
       "      <td>10</td>\n",
       "      <td>8.88</td>\n",
       "      <td>75894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>12355</td>\n",
       "      <td>Ookami Kodomo no Ame to Yuki</td>\n",
       "      <td>Fantasy, Slice of Life</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>8.84</td>\n",
       "      <td>226193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1575</td>\n",
       "      <td>Code Geass: Hangyaku no Lelouch</td>\n",
       "      <td>Action, Mecha, Military, School, Sci-Fi, Super...</td>\n",
       "      <td>TV</td>\n",
       "      <td>25</td>\n",
       "      <td>8.83</td>\n",
       "      <td>715151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>263</td>\n",
       "      <td>Hajime no Ippo</td>\n",
       "      <td>Comedy, Drama, Shounen, Sports</td>\n",
       "      <td>TV</td>\n",
       "      <td>75</td>\n",
       "      <td>8.83</td>\n",
       "      <td>157670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>44</td>\n",
       "      <td>Rurouni Kenshin: Meiji Kenkaku Romantan - Tsui...</td>\n",
       "      <td>Action, Drama, Historical, Martial Arts, Roman...</td>\n",
       "      <td>OVA</td>\n",
       "      <td>4</td>\n",
       "      <td>8.83</td>\n",
       "      <td>129307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1</td>\n",
       "      <td>Cowboy Bebop</td>\n",
       "      <td>Action, Adventure, Comedy, Drama, Sci-Fi, Space</td>\n",
       "      <td>TV</td>\n",
       "      <td>26</td>\n",
       "      <td>8.82</td>\n",
       "      <td>486824</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>30276</td>\n",
       "      <td>One Punch Man</td>\n",
       "      <td>Action, Comedy, Parody, Sci-Fi, Seinen, Super ...</td>\n",
       "      <td>TV</td>\n",
       "      <td>12</td>\n",
       "      <td>8.82</td>\n",
       "      <td>552458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>164</td>\n",
       "      <td>Mononoke Hime</td>\n",
       "      <td>Action, Adventure, Fantasy</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>8.81</td>\n",
       "      <td>339556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>7311</td>\n",
       "      <td>Suzumiya Haruhi no Shoushitsu</td>\n",
       "      <td>Comedy, Mystery, Romance, School, Sci-Fi, Supe...</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>8.81</td>\n",
       "      <td>240297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>17074</td>\n",
       "      <td>Monogatari Series: Second Season</td>\n",
       "      <td>Comedy, Mystery, Romance, Supernatural, Vampire</td>\n",
       "      <td>TV</td>\n",
       "      <td>26</td>\n",
       "      <td>8.80</td>\n",
       "      <td>205959</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>21939</td>\n",
       "      <td>Mushishi Zoku Shou</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>TV</td>\n",
       "      <td>10</td>\n",
       "      <td>8.80</td>\n",
       "      <td>101351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>457</td>\n",
       "      <td>Mushishi</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>TV</td>\n",
       "      <td>26</td>\n",
       "      <td>8.78</td>\n",
       "      <td>300030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2001</td>\n",
       "      <td>Tengen Toppa Gurren Lagann</td>\n",
       "      <td>Action, Adventure, Comedy, Mecha, Sci-Fi</td>\n",
       "      <td>TV</td>\n",
       "      <td>27</td>\n",
       "      <td>8.78</td>\n",
       "      <td>562962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12264</th>\n",
       "      <td>32195</td>\n",
       "      <td>Junjou Shoujo Et Cetera Specials</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>Special</td>\n",
       "      <td>2</td>\n",
       "      <td>6.42</td>\n",
       "      <td>254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12265</th>\n",
       "      <td>34361</td>\n",
       "      <td>Kyonyuu Reijou MC Gakuen</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12266</th>\n",
       "      <td>7914</td>\n",
       "      <td>Kyuukyoku no Chef wa Oishinbo Papa</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>5.43</td>\n",
       "      <td>262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12267</th>\n",
       "      <td>14207</td>\n",
       "      <td>Lovely Series</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.11</td>\n",
       "      <td>174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12268</th>\n",
       "      <td>23677</td>\n",
       "      <td>Manga Edo Erobanashi</td>\n",
       "      <td>Comedy, Hentai, Historical</td>\n",
       "      <td>OVA</td>\n",
       "      <td>5</td>\n",
       "      <td>2.86</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12269</th>\n",
       "      <td>13959</td>\n",
       "      <td>Milky Gal: Cats Ai</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.08</td>\n",
       "      <td>164</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12270</th>\n",
       "      <td>29994</td>\n",
       "      <td>Misato-chan no Yume Nikki</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>3.00</td>\n",
       "      <td>147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12271</th>\n",
       "      <td>5559</td>\n",
       "      <td>Nijuusou: Wana ni Ochita Onna-tachi</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>5.20</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12272</th>\n",
       "      <td>18197</td>\n",
       "      <td>Nudl Nude</td>\n",
       "      <td>Comedy, Hentai, Parody</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.14</td>\n",
       "      <td>186</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12273</th>\n",
       "      <td>18199</td>\n",
       "      <td>Nudl Nude 2</td>\n",
       "      <td>Comedy, Hentai, Parody</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.00</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12274</th>\n",
       "      <td>34492</td>\n",
       "      <td>Nuki Doki! Tenshi to Akuma no Sakusei Battle -...</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12275</th>\n",
       "      <td>29111</td>\n",
       "      <td>Onna Spy Goumon: Teki no Ajito wa Jotai Goumonsho</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>3.14</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12276</th>\n",
       "      <td>32713</td>\n",
       "      <td>Original C-V-P Momoko</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.00</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12277</th>\n",
       "      <td>12397</td>\n",
       "      <td>Original Video Romance Animation</td>\n",
       "      <td>Comedy, Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.66</td>\n",
       "      <td>176</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12278</th>\n",
       "      <td>17833</td>\n",
       "      <td>Pink no Curtain</td>\n",
       "      <td>Hentai, Slice of Life</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>3.61</td>\n",
       "      <td>138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12279</th>\n",
       "      <td>34491</td>\n",
       "      <td>Sagurare Otome The Animation</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12280</th>\n",
       "      <td>34312</td>\n",
       "      <td>Saimin Class</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12281</th>\n",
       "      <td>9504</td>\n",
       "      <td>Sakura no Mori</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.53</td>\n",
       "      <td>221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12282</th>\n",
       "      <td>34388</td>\n",
       "      <td>Shikkoku no Shaga The Animation</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>195</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12283</th>\n",
       "      <td>29992</td>\n",
       "      <td>Silent Chaser Kagami</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.95</td>\n",
       "      <td>112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12284</th>\n",
       "      <td>26031</td>\n",
       "      <td>Super Erotic Anime</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.45</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12285</th>\n",
       "      <td>34399</td>\n",
       "      <td>Taimanin Asagi 3</td>\n",
       "      <td>Demons, Hentai, Supernatural</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12286</th>\n",
       "      <td>10368</td>\n",
       "      <td>Teleclub no Himitsu</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.67</td>\n",
       "      <td>148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12287</th>\n",
       "      <td>9352</td>\n",
       "      <td>Tenshi no Habataki Jun</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.33</td>\n",
       "      <td>201</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12288</th>\n",
       "      <td>5541</td>\n",
       "      <td>The Satisfaction</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.37</td>\n",
       "      <td>166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12289</th>\n",
       "      <td>9316</td>\n",
       "      <td>Toushindai My Lover: Minami tai Mecha-Minami</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.15</td>\n",
       "      <td>211</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12290</th>\n",
       "      <td>5543</td>\n",
       "      <td>Under World</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.28</td>\n",
       "      <td>183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12291</th>\n",
       "      <td>5621</td>\n",
       "      <td>Violence Gekiga David no Hoshi</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>4</td>\n",
       "      <td>4.88</td>\n",
       "      <td>219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12292</th>\n",
       "      <td>6133</td>\n",
       "      <td>Violence Gekiga Shin David no Hoshi: Inma Dens...</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.98</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12293</th>\n",
       "      <td>26081</td>\n",
       "      <td>Yasuji no Pornorama: Yacchimae!!</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>5.46</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>12294 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       anime_id                                               name  \\\n",
       "0         32281                                     Kimi no Na wa.   \n",
       "1          5114                   Fullmetal Alchemist: Brotherhood   \n",
       "2         28977                                           Gintama°   \n",
       "3          9253                                        Steins;Gate   \n",
       "4          9969                                      Gintama&#039;   \n",
       "5         32935  Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...   \n",
       "6         11061                             Hunter x Hunter (2011)   \n",
       "7           820                               Ginga Eiyuu Densetsu   \n",
       "8         15335  Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...   \n",
       "9         15417                           Gintama&#039;: Enchousen   \n",
       "10         4181                               Clannad: After Story   \n",
       "11        28851                                     Koe no Katachi   \n",
       "12          918                                            Gintama   \n",
       "13         2904                 Code Geass: Hangyaku no Lelouch R2   \n",
       "14        28891                            Haikyuu!! Second Season   \n",
       "15          199                      Sen to Chihiro no Kamikakushi   \n",
       "16        23273                            Shigatsu wa Kimi no Uso   \n",
       "17        24701                      Mushishi Zoku Shou 2nd Season   \n",
       "18        12355                       Ookami Kodomo no Ame to Yuki   \n",
       "19         1575                    Code Geass: Hangyaku no Lelouch   \n",
       "20          263                                     Hajime no Ippo   \n",
       "21           44  Rurouni Kenshin: Meiji Kenkaku Romantan - Tsui...   \n",
       "22            1                                       Cowboy Bebop   \n",
       "23        30276                                      One Punch Man   \n",
       "24          164                                      Mononoke Hime   \n",
       "25         7311                      Suzumiya Haruhi no Shoushitsu   \n",
       "26        17074                   Monogatari Series: Second Season   \n",
       "27        21939                                 Mushishi Zoku Shou   \n",
       "28          457                                           Mushishi   \n",
       "29         2001                         Tengen Toppa Gurren Lagann   \n",
       "...         ...                                                ...   \n",
       "12264     32195                   Junjou Shoujo Et Cetera Specials   \n",
       "12265     34361                           Kyonyuu Reijou MC Gakuen   \n",
       "12266      7914                 Kyuukyoku no Chef wa Oishinbo Papa   \n",
       "12267     14207                                      Lovely Series   \n",
       "12268     23677                               Manga Edo Erobanashi   \n",
       "12269     13959                                 Milky Gal: Cats Ai   \n",
       "12270     29994                          Misato-chan no Yume Nikki   \n",
       "12271      5559                Nijuusou: Wana ni Ochita Onna-tachi   \n",
       "12272     18197                                          Nudl Nude   \n",
       "12273     18199                                        Nudl Nude 2   \n",
       "12274     34492  Nuki Doki! Tenshi to Akuma no Sakusei Battle -...   \n",
       "12275     29111  Onna Spy Goumon: Teki no Ajito wa Jotai Goumonsho   \n",
       "12276     32713                              Original C-V-P Momoko   \n",
       "12277     12397                   Original Video Romance Animation   \n",
       "12278     17833                                    Pink no Curtain   \n",
       "12279     34491                       Sagurare Otome The Animation   \n",
       "12280     34312                                       Saimin Class   \n",
       "12281      9504                                     Sakura no Mori   \n",
       "12282     34388                    Shikkoku no Shaga The Animation   \n",
       "12283     29992                               Silent Chaser Kagami   \n",
       "12284     26031                                 Super Erotic Anime   \n",
       "12285     34399                                   Taimanin Asagi 3   \n",
       "12286     10368                                Teleclub no Himitsu   \n",
       "12287      9352                             Tenshi no Habataki Jun   \n",
       "12288      5541                                   The Satisfaction   \n",
       "12289      9316       Toushindai My Lover: Minami tai Mecha-Minami   \n",
       "12290      5543                                        Under World   \n",
       "12291      5621                     Violence Gekiga David no Hoshi   \n",
       "12292      6133  Violence Gekiga Shin David no Hoshi: Inma Dens...   \n",
       "12293     26081                   Yasuji no Pornorama: Yacchimae!!   \n",
       "\n",
       "                                                   genre     type episodes  \\\n",
       "0                   Drama, Romance, School, Supernatural    Movie        1   \n",
       "1      Action, Adventure, Drama, Fantasy, Magic, Mili...       TV       64   \n",
       "2      Action, Comedy, Historical, Parody, Samurai, S...       TV       51   \n",
       "3                                       Sci-Fi, Thriller       TV       24   \n",
       "4      Action, Comedy, Historical, Parody, Samurai, S...       TV       51   \n",
       "5                 Comedy, Drama, School, Shounen, Sports       TV       10   \n",
       "6                Action, Adventure, Shounen, Super Power       TV      148   \n",
       "7                         Drama, Military, Sci-Fi, Space      OVA      110   \n",
       "8      Action, Comedy, Historical, Parody, Samurai, S...    Movie        1   \n",
       "9      Action, Comedy, Historical, Parody, Samurai, S...       TV       13   \n",
       "10     Drama, Fantasy, Romance, Slice of Life, Supern...       TV       24   \n",
       "11                                Drama, School, Shounen    Movie        1   \n",
       "12     Action, Comedy, Historical, Parody, Samurai, S...       TV      201   \n",
       "13     Action, Drama, Mecha, Military, Sci-Fi, Super ...       TV       25   \n",
       "14                Comedy, Drama, School, Shounen, Sports       TV       25   \n",
       "15                        Adventure, Drama, Supernatural    Movie        1   \n",
       "16                Drama, Music, Romance, School, Shounen       TV       22   \n",
       "17     Adventure, Fantasy, Historical, Mystery, Seine...       TV       10   \n",
       "18                                Fantasy, Slice of Life    Movie        1   \n",
       "19     Action, Mecha, Military, School, Sci-Fi, Super...       TV       25   \n",
       "20                        Comedy, Drama, Shounen, Sports       TV       75   \n",
       "21     Action, Drama, Historical, Martial Arts, Roman...      OVA        4   \n",
       "22       Action, Adventure, Comedy, Drama, Sci-Fi, Space       TV       26   \n",
       "23     Action, Comedy, Parody, Sci-Fi, Seinen, Super ...       TV       12   \n",
       "24                            Action, Adventure, Fantasy    Movie        1   \n",
       "25     Comedy, Mystery, Romance, School, Sci-Fi, Supe...    Movie        1   \n",
       "26       Comedy, Mystery, Romance, Supernatural, Vampire       TV       26   \n",
       "27     Adventure, Fantasy, Historical, Mystery, Seine...       TV       10   \n",
       "28     Adventure, Fantasy, Historical, Mystery, Seine...       TV       26   \n",
       "29              Action, Adventure, Comedy, Mecha, Sci-Fi       TV       27   \n",
       "...                                                  ...      ...      ...   \n",
       "12264                                             Hentai  Special        2   \n",
       "12265                                             Hentai      OVA  Unknown   \n",
       "12266                                             Hentai      OVA        1   \n",
       "12267                                             Hentai      OVA        2   \n",
       "12268                         Comedy, Hentai, Historical      OVA        5   \n",
       "12269                                             Hentai      OVA        1   \n",
       "12270                                             Hentai      OVA        1   \n",
       "12271                                             Hentai      OVA        1   \n",
       "12272                             Comedy, Hentai, Parody      OVA        1   \n",
       "12273                             Comedy, Hentai, Parody      OVA        1   \n",
       "12274                                             Hentai      OVA  Unknown   \n",
       "12275                                             Hentai      OVA        1   \n",
       "12276                                             Hentai      OVA        2   \n",
       "12277                                     Comedy, Hentai      OVA        2   \n",
       "12278                              Hentai, Slice of Life      OVA        1   \n",
       "12279                                             Hentai      OVA        1   \n",
       "12280                                             Hentai      OVA  Unknown   \n",
       "12281                                             Hentai      OVA        2   \n",
       "12282                                             Hentai      OVA  Unknown   \n",
       "12283                                             Hentai      OVA        1   \n",
       "12284                                             Hentai      OVA        2   \n",
       "12285                       Demons, Hentai, Supernatural      OVA  Unknown   \n",
       "12286                                             Hentai      OVA        2   \n",
       "12287                                             Hentai      OVA        1   \n",
       "12288                                             Hentai      OVA        1   \n",
       "12289                                             Hentai      OVA        1   \n",
       "12290                                             Hentai      OVA        1   \n",
       "12291                                             Hentai      OVA        4   \n",
       "12292                                             Hentai      OVA        1   \n",
       "12293                                             Hentai    Movie        1   \n",
       "\n",
       "       rating  members  \n",
       "0        9.37   200630  \n",
       "1        9.26   793665  \n",
       "2        9.25   114262  \n",
       "3        9.17   673572  \n",
       "4        9.16   151266  \n",
       "5        9.15    93351  \n",
       "6        9.13   425855  \n",
       "7        9.11    80679  \n",
       "8        9.10    72534  \n",
       "9        9.11    81109  \n",
       "10       9.06   456749  \n",
       "11       9.05   102733  \n",
       "12       9.04   336376  \n",
       "13       8.98   572888  \n",
       "14       8.93   179342  \n",
       "15       8.93   466254  \n",
       "16       8.92   416397  \n",
       "17       8.88    75894  \n",
       "18       8.84   226193  \n",
       "19       8.83   715151  \n",
       "20       8.83   157670  \n",
       "21       8.83   129307  \n",
       "22       8.82   486824  \n",
       "23       8.82   552458  \n",
       "24       8.81   339556  \n",
       "25       8.81   240297  \n",
       "26       8.80   205959  \n",
       "27       8.80   101351  \n",
       "28       8.78   300030  \n",
       "29       8.78   562962  \n",
       "...       ...      ...  \n",
       "12264    6.42      254  \n",
       "12265     NaN      205  \n",
       "12266    5.43      262  \n",
       "12267    4.11      174  \n",
       "12268    2.86      111  \n",
       "12269    4.08      164  \n",
       "12270    3.00      147  \n",
       "12271    5.20      240  \n",
       "12272    4.14      186  \n",
       "12273    4.00      146  \n",
       "12274     NaN      392  \n",
       "12275    3.14      108  \n",
       "12276    4.00       66  \n",
       "12277    4.66      176  \n",
       "12278    3.61      138  \n",
       "12279     NaN       79  \n",
       "12280     NaN      240  \n",
       "12281    4.53      221  \n",
       "12282     NaN      195  \n",
       "12283    4.95      112  \n",
       "12284    4.45      118  \n",
       "12285     NaN      485  \n",
       "12286    4.67      148  \n",
       "12287    4.33      201  \n",
       "12288    4.37      166  \n",
       "12289    4.15      211  \n",
       "12290    4.28      183  \n",
       "12291    4.88      219  \n",
       "12292    4.98      175  \n",
       "12293    5.46      142  \n",
       "\n",
       "[12294 rows x 7 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 12294 entries, 0 to 12293\n",
      "Data columns (total 7 columns):\n",
      "anime_id    12294 non-null int64\n",
      "name        12294 non-null object\n",
      "genre       12232 non-null object\n",
      "type        12269 non-null object\n",
      "episodes    12294 non-null object\n",
      "rating      12064 non-null float64\n",
      "members     12294 non-null int64\n",
      "dtypes: float64(1), int64(2), object(4)\n",
      "memory usage: 672.4+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1=pd.read_csv('anime.csv',encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>anime_id</th>\n",
       "      <th>name</th>\n",
       "      <th>genre</th>\n",
       "      <th>type</th>\n",
       "      <th>episodes</th>\n",
       "      <th>rating</th>\n",
       "      <th>members</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>32281</td>\n",
       "      <td>Kimi no Na wa.</td>\n",
       "      <td>Drama, Romance, School, Supernatural</td>\n",
       "      <td>Movie</td>\n",
       "      <td>1</td>\n",
       "      <td>9.37</td>\n",
       "      <td>200630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5114</td>\n",
       "      <td>Fullmetal Alchemist: Brotherhood</td>\n",
       "      <td>Action, Adventure, Drama, Fantasy, Magic, Mili...</td>\n",
       "      <td>TV</td>\n",
       "      <td>64</td>\n",
       "      <td>9.26</td>\n",
       "      <td>793665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28977</td>\n",
       "      <td>Gintama°</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>TV</td>\n",
       "      <td>51</td>\n",
       "      <td>9.25</td>\n",
       "      <td>114262</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   anime_id                              name  \\\n",
       "0     32281                    Kimi no Na wa.   \n",
       "1      5114  Fullmetal Alchemist: Brotherhood   \n",
       "2     28977                          Gintama°   \n",
       "\n",
       "                                               genre   type episodes  rating  \\\n",
       "0               Drama, Romance, School, Supernatural  Movie        1    9.37   \n",
       "1  Action, Adventure, Drama, Fantasy, Magic, Mili...     TV       64    9.26   \n",
       "2  Action, Comedy, Historical, Parody, Samurai, S...     TV       51    9.25   \n",
       "\n",
       "   members  \n",
       "0   200630  \n",
       "1   793665  \n",
       "2   114262  "
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1.loc[df1['type']=='Movie','type']=1\n",
    "df1.loc[df1['type']=='TV','type']=2\n",
    "df1.loc[df1['type']=='OVA','type']=3\n",
    "df1.loc[df1['type']=='Special','type']=4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>anime_id</th>\n",
       "      <th>name</th>\n",
       "      <th>genre</th>\n",
       "      <th>type</th>\n",
       "      <th>episodes</th>\n",
       "      <th>rating</th>\n",
       "      <th>members</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>32281</td>\n",
       "      <td>Kimi no Na wa.</td>\n",
       "      <td>Drama, Romance, School, Supernatural</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.37</td>\n",
       "      <td>200630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5114</td>\n",
       "      <td>Fullmetal Alchemist: Brotherhood</td>\n",
       "      <td>Action, Adventure, Drama, Fantasy, Magic, Mili...</td>\n",
       "      <td>2</td>\n",
       "      <td>64</td>\n",
       "      <td>9.26</td>\n",
       "      <td>793665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28977</td>\n",
       "      <td>Gintama°</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>51</td>\n",
       "      <td>9.25</td>\n",
       "      <td>114262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9253</td>\n",
       "      <td>Steins;Gate</td>\n",
       "      <td>Sci-Fi, Thriller</td>\n",
       "      <td>2</td>\n",
       "      <td>24</td>\n",
       "      <td>9.17</td>\n",
       "      <td>673572</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9969</td>\n",
       "      <td>Gintama&amp;#039;</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>51</td>\n",
       "      <td>9.16</td>\n",
       "      <td>151266</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>32935</td>\n",
       "      <td>Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...</td>\n",
       "      <td>Comedy, Drama, School, Shounen, Sports</td>\n",
       "      <td>2</td>\n",
       "      <td>10</td>\n",
       "      <td>9.15</td>\n",
       "      <td>93351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11061</td>\n",
       "      <td>Hunter x Hunter (2011)</td>\n",
       "      <td>Action, Adventure, Shounen, Super Power</td>\n",
       "      <td>2</td>\n",
       "      <td>148</td>\n",
       "      <td>9.13</td>\n",
       "      <td>425855</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>820</td>\n",
       "      <td>Ginga Eiyuu Densetsu</td>\n",
       "      <td>Drama, Military, Sci-Fi, Space</td>\n",
       "      <td>3</td>\n",
       "      <td>110</td>\n",
       "      <td>9.11</td>\n",
       "      <td>80679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>15335</td>\n",
       "      <td>Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.10</td>\n",
       "      <td>72534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>15417</td>\n",
       "      <td>Gintama&amp;#039;: Enchousen</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>9.11</td>\n",
       "      <td>81109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>4181</td>\n",
       "      <td>Clannad: After Story</td>\n",
       "      <td>Drama, Fantasy, Romance, Slice of Life, Supern...</td>\n",
       "      <td>2</td>\n",
       "      <td>24</td>\n",
       "      <td>9.06</td>\n",
       "      <td>456749</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>28851</td>\n",
       "      <td>Koe no Katachi</td>\n",
       "      <td>Drama, School, Shounen</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.05</td>\n",
       "      <td>102733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>918</td>\n",
       "      <td>Gintama</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>201</td>\n",
       "      <td>9.04</td>\n",
       "      <td>336376</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    anime_id                                               name  \\\n",
       "0      32281                                     Kimi no Na wa.   \n",
       "1       5114                   Fullmetal Alchemist: Brotherhood   \n",
       "2      28977                                           Gintama°   \n",
       "3       9253                                        Steins;Gate   \n",
       "4       9969                                      Gintama&#039;   \n",
       "5      32935  Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...   \n",
       "6      11061                             Hunter x Hunter (2011)   \n",
       "7        820                               Ginga Eiyuu Densetsu   \n",
       "8      15335  Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...   \n",
       "9      15417                           Gintama&#039;: Enchousen   \n",
       "10      4181                               Clannad: After Story   \n",
       "11     28851                                     Koe no Katachi   \n",
       "12       918                                            Gintama   \n",
       "\n",
       "                                                genre type episodes  rating  \\\n",
       "0                Drama, Romance, School, Supernatural    1        1    9.37   \n",
       "1   Action, Adventure, Drama, Fantasy, Magic, Mili...    2       64    9.26   \n",
       "2   Action, Comedy, Historical, Parody, Samurai, S...    2       51    9.25   \n",
       "3                                    Sci-Fi, Thriller    2       24    9.17   \n",
       "4   Action, Comedy, Historical, Parody, Samurai, S...    2       51    9.16   \n",
       "5              Comedy, Drama, School, Shounen, Sports    2       10    9.15   \n",
       "6             Action, Adventure, Shounen, Super Power    2      148    9.13   \n",
       "7                      Drama, Military, Sci-Fi, Space    3      110    9.11   \n",
       "8   Action, Comedy, Historical, Parody, Samurai, S...    1        1    9.10   \n",
       "9   Action, Comedy, Historical, Parody, Samurai, S...    2       13    9.11   \n",
       "10  Drama, Fantasy, Romance, Slice of Life, Supern...    2       24    9.06   \n",
       "11                             Drama, School, Shounen    1        1    9.05   \n",
       "12  Action, Comedy, Historical, Parody, Samurai, S...    2      201    9.04   \n",
       "\n",
       "    members  \n",
       "0    200630  \n",
       "1    793665  \n",
       "2    114262  \n",
       "3    673572  \n",
       "4    151266  \n",
       "5     93351  \n",
       "6    425855  \n",
       "7     80679  \n",
       "8     72534  \n",
       "9     81109  \n",
       "10   456749  \n",
       "11   102733  \n",
       "12   336376  "
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.head(13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1.loc[df1['genre']=='Action','type']=1\n",
    "df1.loc[df1['genre']=='Adventure','type']=2\n",
    "df1.loc[df1['genre']=='Comedy','type']=3\n",
    "df1.loc[df1['genre']=='Drama','type']=4\n",
    "df1.loc[df1['genre']=='Demons','type']=5\n",
    "df1.loc[df1['genre']=='Fantasy','type']=6\n",
    "df1.loc[df1['genre']=='Game','type']=7\n",
    "df1.loc[df1['genre']=='Hentai','type']=8\n",
    "df1.loc[df1['genre']=='Historical','type']=9\n",
    "df1.loc[df1['genre']=='Horror','type']=10\n",
    "df1.loc[df1['genre']=='Josei','type']=11\n",
    "df1.loc[df1['genre']=='Kids','type']=12\n",
    "df1.loc[df1['genre']=='Magic','type']=13\n",
    "df1.loc[df1['genre']=='Martial Arts','type']=14\n",
    "df1.loc[df1['genre']=='Mecha','type']=15\n",
    "df1.loc[df1['genre']=='Military','type']=16\n",
    "df1.loc[df1['genre']=='Music','type']=17\n",
    "df1.loc[df1['genre']=='Mystery','type']=18\n",
    "df1.loc[df1['genre']=='Parody','type']=19\n",
    "df1.loc[df1['genre']=='Psychological','type']=20\n",
    "df1.loc[df1['genre']=='Romance','type']=21\n",
    "df1.loc[df1['genre']=='Samurai','type']=22\n",
    "df1.loc[df1['genre']=='Sci-Fi','type']=23\n",
    "df1.loc[df1['genre']=='School','type']=24\n",
    "df1.loc[df1['genre']=='Seinen','type']=25\n",
    "df1.loc[df1['genre']=='Shounen','type']=26\n",
    "df1.loc[df1['genre']=='Shoujo','type']=27\n",
    "df1.loc[df1['genre']=='Slice of Life','type']=28\n",
    "df1.loc[df1['genre']=='Space','type']=29\n",
    "df1.loc[df1['genre']=='Psychological','type']=30\n",
    "df1.loc[df1['genre']=='Romance','type']=31\n",
    "df1.loc[df1['genre']=='Samurai','type']=32\n",
    "df1.loc[df1['genre']=='Sci-Fi','type']=33\n",
    "df1.loc[df1['genre']=='School','type']=34\n",
    "df1.loc[df1['genre']=='Seinen','type']=35\n",
    "df1.loc[df1['genre']=='Shounen','type']=36\n",
    "df1.loc[df1['genre']=='Shoujo','type']=37\n",
    "df1.loc[df1['genre']=='Slice of Life','type']=38\n",
    "df1.loc[df1['genre']=='Space','type']=39\n",
    "df1.loc[df1['genre']=='Sports','type']=40\n",
    "df1.loc[df1['genre']=='Super Power','type']=41\n",
    "df1.loc[df1['genre']=='Supernatural','type']=42\n",
    "df1.loc[df1['genre']=='Thriller','type']=43\n",
    "df1.loc[df1['genre']=='Vampire','type']=44\n",
    "df1.loc[df1['genre']=='Yuri','type']=45\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>anime_id</th>\n",
       "      <th>name</th>\n",
       "      <th>genre</th>\n",
       "      <th>type</th>\n",
       "      <th>episodes</th>\n",
       "      <th>rating</th>\n",
       "      <th>members</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>32281</td>\n",
       "      <td>Kimi no Na wa.</td>\n",
       "      <td>Drama, Romance, School, Supernatural</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.37</td>\n",
       "      <td>200630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5114</td>\n",
       "      <td>Fullmetal Alchemist: Brotherhood</td>\n",
       "      <td>Action, Adventure, Drama, Fantasy, Magic, Mili...</td>\n",
       "      <td>2</td>\n",
       "      <td>64</td>\n",
       "      <td>9.26</td>\n",
       "      <td>793665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28977</td>\n",
       "      <td>Gintama°</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>51</td>\n",
       "      <td>9.25</td>\n",
       "      <td>114262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9253</td>\n",
       "      <td>Steins;Gate</td>\n",
       "      <td>Sci-Fi, Thriller</td>\n",
       "      <td>2</td>\n",
       "      <td>24</td>\n",
       "      <td>9.17</td>\n",
       "      <td>673572</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9969</td>\n",
       "      <td>Gintama&amp;#039;</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>51</td>\n",
       "      <td>9.16</td>\n",
       "      <td>151266</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>32935</td>\n",
       "      <td>Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...</td>\n",
       "      <td>Comedy, Drama, School, Shounen, Sports</td>\n",
       "      <td>2</td>\n",
       "      <td>10</td>\n",
       "      <td>9.15</td>\n",
       "      <td>93351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11061</td>\n",
       "      <td>Hunter x Hunter (2011)</td>\n",
       "      <td>Action, Adventure, Shounen, Super Power</td>\n",
       "      <td>2</td>\n",
       "      <td>148</td>\n",
       "      <td>9.13</td>\n",
       "      <td>425855</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>820</td>\n",
       "      <td>Ginga Eiyuu Densetsu</td>\n",
       "      <td>Drama, Military, Sci-Fi, Space</td>\n",
       "      <td>OVA</td>\n",
       "      <td>110</td>\n",
       "      <td>9.11</td>\n",
       "      <td>80679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>15335</td>\n",
       "      <td>Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.10</td>\n",
       "      <td>72534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>15417</td>\n",
       "      <td>Gintama&amp;#039;: Enchousen</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>9.11</td>\n",
       "      <td>81109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>4181</td>\n",
       "      <td>Clannad: After Story</td>\n",
       "      <td>Drama, Fantasy, Romance, Slice of Life, Supern...</td>\n",
       "      <td>2</td>\n",
       "      <td>24</td>\n",
       "      <td>9.06</td>\n",
       "      <td>456749</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>28851</td>\n",
       "      <td>Koe no Katachi</td>\n",
       "      <td>Drama, School, Shounen</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9.05</td>\n",
       "      <td>102733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>918</td>\n",
       "      <td>Gintama</td>\n",
       "      <td>Action, Comedy, Historical, Parody, Samurai, S...</td>\n",
       "      <td>2</td>\n",
       "      <td>201</td>\n",
       "      <td>9.04</td>\n",
       "      <td>336376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2904</td>\n",
       "      <td>Code Geass: Hangyaku no Lelouch R2</td>\n",
       "      <td>Action, Drama, Mecha, Military, Sci-Fi, Super ...</td>\n",
       "      <td>2</td>\n",
       "      <td>25</td>\n",
       "      <td>8.98</td>\n",
       "      <td>572888</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>28891</td>\n",
       "      <td>Haikyuu!! Second Season</td>\n",
       "      <td>Comedy, Drama, School, Shounen, Sports</td>\n",
       "      <td>2</td>\n",
       "      <td>25</td>\n",
       "      <td>8.93</td>\n",
       "      <td>179342</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>199</td>\n",
       "      <td>Sen to Chihiro no Kamikakushi</td>\n",
       "      <td>Adventure, Drama, Supernatural</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8.93</td>\n",
       "      <td>466254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>23273</td>\n",
       "      <td>Shigatsu wa Kimi no Uso</td>\n",
       "      <td>Drama, Music, Romance, School, Shounen</td>\n",
       "      <td>2</td>\n",
       "      <td>22</td>\n",
       "      <td>8.92</td>\n",
       "      <td>416397</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>24701</td>\n",
       "      <td>Mushishi Zoku Shou 2nd Season</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>2</td>\n",
       "      <td>10</td>\n",
       "      <td>8.88</td>\n",
       "      <td>75894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>12355</td>\n",
       "      <td>Ookami Kodomo no Ame to Yuki</td>\n",
       "      <td>Fantasy, Slice of Life</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8.84</td>\n",
       "      <td>226193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1575</td>\n",
       "      <td>Code Geass: Hangyaku no Lelouch</td>\n",
       "      <td>Action, Mecha, Military, School, Sci-Fi, Super...</td>\n",
       "      <td>2</td>\n",
       "      <td>25</td>\n",
       "      <td>8.83</td>\n",
       "      <td>715151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>263</td>\n",
       "      <td>Hajime no Ippo</td>\n",
       "      <td>Comedy, Drama, Shounen, Sports</td>\n",
       "      <td>2</td>\n",
       "      <td>75</td>\n",
       "      <td>8.83</td>\n",
       "      <td>157670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>44</td>\n",
       "      <td>Rurouni Kenshin: Meiji Kenkaku Romantan - Tsui...</td>\n",
       "      <td>Action, Drama, Historical, Martial Arts, Roman...</td>\n",
       "      <td>OVA</td>\n",
       "      <td>4</td>\n",
       "      <td>8.83</td>\n",
       "      <td>129307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1</td>\n",
       "      <td>Cowboy Bebop</td>\n",
       "      <td>Action, Adventure, Comedy, Drama, Sci-Fi, Space</td>\n",
       "      <td>2</td>\n",
       "      <td>26</td>\n",
       "      <td>8.82</td>\n",
       "      <td>486824</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>30276</td>\n",
       "      <td>One Punch Man</td>\n",
       "      <td>Action, Comedy, Parody, Sci-Fi, Seinen, Super ...</td>\n",
       "      <td>2</td>\n",
       "      <td>12</td>\n",
       "      <td>8.82</td>\n",
       "      <td>552458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>164</td>\n",
       "      <td>Mononoke Hime</td>\n",
       "      <td>Action, Adventure, Fantasy</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8.81</td>\n",
       "      <td>339556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>7311</td>\n",
       "      <td>Suzumiya Haruhi no Shoushitsu</td>\n",
       "      <td>Comedy, Mystery, Romance, School, Sci-Fi, Supe...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8.81</td>\n",
       "      <td>240297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>17074</td>\n",
       "      <td>Monogatari Series: Second Season</td>\n",
       "      <td>Comedy, Mystery, Romance, Supernatural, Vampire</td>\n",
       "      <td>2</td>\n",
       "      <td>26</td>\n",
       "      <td>8.80</td>\n",
       "      <td>205959</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>21939</td>\n",
       "      <td>Mushishi Zoku Shou</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>2</td>\n",
       "      <td>10</td>\n",
       "      <td>8.80</td>\n",
       "      <td>101351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>457</td>\n",
       "      <td>Mushishi</td>\n",
       "      <td>Adventure, Fantasy, Historical, Mystery, Seine...</td>\n",
       "      <td>2</td>\n",
       "      <td>26</td>\n",
       "      <td>8.78</td>\n",
       "      <td>300030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2001</td>\n",
       "      <td>Tengen Toppa Gurren Lagann</td>\n",
       "      <td>Action, Adventure, Comedy, Mecha, Sci-Fi</td>\n",
       "      <td>2</td>\n",
       "      <td>27</td>\n",
       "      <td>8.78</td>\n",
       "      <td>562962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12264</th>\n",
       "      <td>32195</td>\n",
       "      <td>Junjou Shoujo Et Cetera Specials</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>6.42</td>\n",
       "      <td>254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12265</th>\n",
       "      <td>34361</td>\n",
       "      <td>Kyonyuu Reijou MC Gakuen</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12266</th>\n",
       "      <td>7914</td>\n",
       "      <td>Kyuukyoku no Chef wa Oishinbo Papa</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>5.43</td>\n",
       "      <td>262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12267</th>\n",
       "      <td>14207</td>\n",
       "      <td>Lovely Series</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.11</td>\n",
       "      <td>174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12268</th>\n",
       "      <td>23677</td>\n",
       "      <td>Manga Edo Erobanashi</td>\n",
       "      <td>Comedy, Hentai, Historical</td>\n",
       "      <td>OVA</td>\n",
       "      <td>5</td>\n",
       "      <td>2.86</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12269</th>\n",
       "      <td>13959</td>\n",
       "      <td>Milky Gal: Cats Ai</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.08</td>\n",
       "      <td>164</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12270</th>\n",
       "      <td>29994</td>\n",
       "      <td>Misato-chan no Yume Nikki</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>3.00</td>\n",
       "      <td>147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12271</th>\n",
       "      <td>5559</td>\n",
       "      <td>Nijuusou: Wana ni Ochita Onna-tachi</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>5.20</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12272</th>\n",
       "      <td>18197</td>\n",
       "      <td>Nudl Nude</td>\n",
       "      <td>Comedy, Hentai, Parody</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.14</td>\n",
       "      <td>186</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12273</th>\n",
       "      <td>18199</td>\n",
       "      <td>Nudl Nude 2</td>\n",
       "      <td>Comedy, Hentai, Parody</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>4.00</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12274</th>\n",
       "      <td>34492</td>\n",
       "      <td>Nuki Doki! Tenshi to Akuma no Sakusei Battle -...</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12275</th>\n",
       "      <td>29111</td>\n",
       "      <td>Onna Spy Goumon: Teki no Ajito wa Jotai Goumonsho</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>3.14</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12276</th>\n",
       "      <td>32713</td>\n",
       "      <td>Original C-V-P Momoko</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.00</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12277</th>\n",
       "      <td>12397</td>\n",
       "      <td>Original Video Romance Animation</td>\n",
       "      <td>Comedy, Hentai</td>\n",
       "      <td>OVA</td>\n",
       "      <td>2</td>\n",
       "      <td>4.66</td>\n",
       "      <td>176</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12278</th>\n",
       "      <td>17833</td>\n",
       "      <td>Pink no Curtain</td>\n",
       "      <td>Hentai, Slice of Life</td>\n",
       "      <td>OVA</td>\n",
       "      <td>1</td>\n",
       "      <td>3.61</td>\n",
       "      <td>138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12279</th>\n",
       "      <td>34491</td>\n",
       "      <td>Sagurare Otome The Animation</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12280</th>\n",
       "      <td>34312</td>\n",
       "      <td>Saimin Class</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12281</th>\n",
       "      <td>9504</td>\n",
       "      <td>Sakura no Mori</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.53</td>\n",
       "      <td>221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12282</th>\n",
       "      <td>34388</td>\n",
       "      <td>Shikkoku no Shaga The Animation</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>195</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12283</th>\n",
       "      <td>29992</td>\n",
       "      <td>Silent Chaser Kagami</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.95</td>\n",
       "      <td>112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12284</th>\n",
       "      <td>26031</td>\n",
       "      <td>Super Erotic Anime</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.45</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12285</th>\n",
       "      <td>34399</td>\n",
       "      <td>Taimanin Asagi 3</td>\n",
       "      <td>Demons, Hentai, Supernatural</td>\n",
       "      <td>OVA</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>NaN</td>\n",
       "      <td>485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12286</th>\n",
       "      <td>10368</td>\n",
       "      <td>Teleclub no Himitsu</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.67</td>\n",
       "      <td>148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12287</th>\n",
       "      <td>9352</td>\n",
       "      <td>Tenshi no Habataki Jun</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.33</td>\n",
       "      <td>201</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12288</th>\n",
       "      <td>5541</td>\n",
       "      <td>The Satisfaction</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.37</td>\n",
       "      <td>166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12289</th>\n",
       "      <td>9316</td>\n",
       "      <td>Toushindai My Lover: Minami tai Mecha-Minami</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.15</td>\n",
       "      <td>211</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12290</th>\n",
       "      <td>5543</td>\n",
       "      <td>Under World</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.28</td>\n",
       "      <td>183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12291</th>\n",
       "      <td>5621</td>\n",
       "      <td>Violence Gekiga David no Hoshi</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>4.88</td>\n",
       "      <td>219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12292</th>\n",
       "      <td>6133</td>\n",
       "      <td>Violence Gekiga Shin David no Hoshi: Inma Dens...</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>4.98</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12293</th>\n",
       "      <td>26081</td>\n",
       "      <td>Yasuji no Pornorama: Yacchimae!!</td>\n",
       "      <td>Hentai</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>5.46</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>12294 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       anime_id                                               name  \\\n",
       "0         32281                                     Kimi no Na wa.   \n",
       "1          5114                   Fullmetal Alchemist: Brotherhood   \n",
       "2         28977                                           Gintama°   \n",
       "3          9253                                        Steins;Gate   \n",
       "4          9969                                      Gintama&#039;   \n",
       "5         32935  Haikyuu!!: Karasuno Koukou VS Shiratorizawa Ga...   \n",
       "6         11061                             Hunter x Hunter (2011)   \n",
       "7           820                               Ginga Eiyuu Densetsu   \n",
       "8         15335  Gintama Movie: Kanketsu-hen - Yorozuya yo Eien...   \n",
       "9         15417                           Gintama&#039;: Enchousen   \n",
       "10         4181                               Clannad: After Story   \n",
       "11        28851                                     Koe no Katachi   \n",
       "12          918                                            Gintama   \n",
       "13         2904                 Code Geass: Hangyaku no Lelouch R2   \n",
       "14        28891                            Haikyuu!! Second Season   \n",
       "15          199                      Sen to Chihiro no Kamikakushi   \n",
       "16        23273                            Shigatsu wa Kimi no Uso   \n",
       "17        24701                      Mushishi Zoku Shou 2nd Season   \n",
       "18        12355                       Ookami Kodomo no Ame to Yuki   \n",
       "19         1575                    Code Geass: Hangyaku no Lelouch   \n",
       "20          263                                     Hajime no Ippo   \n",
       "21           44  Rurouni Kenshin: Meiji Kenkaku Romantan - Tsui...   \n",
       "22            1                                       Cowboy Bebop   \n",
       "23        30276                                      One Punch Man   \n",
       "24          164                                      Mononoke Hime   \n",
       "25         7311                      Suzumiya Haruhi no Shoushitsu   \n",
       "26        17074                   Monogatari Series: Second Season   \n",
       "27        21939                                 Mushishi Zoku Shou   \n",
       "28          457                                           Mushishi   \n",
       "29         2001                         Tengen Toppa Gurren Lagann   \n",
       "...         ...                                                ...   \n",
       "12264     32195                   Junjou Shoujo Et Cetera Specials   \n",
       "12265     34361                           Kyonyuu Reijou MC Gakuen   \n",
       "12266      7914                 Kyuukyoku no Chef wa Oishinbo Papa   \n",
       "12267     14207                                      Lovely Series   \n",
       "12268     23677                               Manga Edo Erobanashi   \n",
       "12269     13959                                 Milky Gal: Cats Ai   \n",
       "12270     29994                          Misato-chan no Yume Nikki   \n",
       "12271      5559                Nijuusou: Wana ni Ochita Onna-tachi   \n",
       "12272     18197                                          Nudl Nude   \n",
       "12273     18199                                        Nudl Nude 2   \n",
       "12274     34492  Nuki Doki! Tenshi to Akuma no Sakusei Battle -...   \n",
       "12275     29111  Onna Spy Goumon: Teki no Ajito wa Jotai Goumonsho   \n",
       "12276     32713                              Original C-V-P Momoko   \n",
       "12277     12397                   Original Video Romance Animation   \n",
       "12278     17833                                    Pink no Curtain   \n",
       "12279     34491                       Sagurare Otome The Animation   \n",
       "12280     34312                                       Saimin Class   \n",
       "12281      9504                                     Sakura no Mori   \n",
       "12282     34388                    Shikkoku no Shaga The Animation   \n",
       "12283     29992                               Silent Chaser Kagami   \n",
       "12284     26031                                 Super Erotic Anime   \n",
       "12285     34399                                   Taimanin Asagi 3   \n",
       "12286     10368                                Teleclub no Himitsu   \n",
       "12287      9352                             Tenshi no Habataki Jun   \n",
       "12288      5541                                   The Satisfaction   \n",
       "12289      9316       Toushindai My Lover: Minami tai Mecha-Minami   \n",
       "12290      5543                                        Under World   \n",
       "12291      5621                     Violence Gekiga David no Hoshi   \n",
       "12292      6133  Violence Gekiga Shin David no Hoshi: Inma Dens...   \n",
       "12293     26081                   Yasuji no Pornorama: Yacchimae!!   \n",
       "\n",
       "                                                   genre type episodes  \\\n",
       "0                   Drama, Romance, School, Supernatural    1        1   \n",
       "1      Action, Adventure, Drama, Fantasy, Magic, Mili...    2       64   \n",
       "2      Action, Comedy, Historical, Parody, Samurai, S...    2       51   \n",
       "3                                       Sci-Fi, Thriller    2       24   \n",
       "4      Action, Comedy, Historical, Parody, Samurai, S...    2       51   \n",
       "5                 Comedy, Drama, School, Shounen, Sports    2       10   \n",
       "6                Action, Adventure, Shounen, Super Power    2      148   \n",
       "7                         Drama, Military, Sci-Fi, Space  OVA      110   \n",
       "8      Action, Comedy, Historical, Parody, Samurai, S...    1        1   \n",
       "9      Action, Comedy, Historical, Parody, Samurai, S...    2       13   \n",
       "10     Drama, Fantasy, Romance, Slice of Life, Supern...    2       24   \n",
       "11                                Drama, School, Shounen    1        1   \n",
       "12     Action, Comedy, Historical, Parody, Samurai, S...    2      201   \n",
       "13     Action, Drama, Mecha, Military, Sci-Fi, Super ...    2       25   \n",
       "14                Comedy, Drama, School, Shounen, Sports    2       25   \n",
       "15                        Adventure, Drama, Supernatural    1        1   \n",
       "16                Drama, Music, Romance, School, Shounen    2       22   \n",
       "17     Adventure, Fantasy, Historical, Mystery, Seine...    2       10   \n",
       "18                                Fantasy, Slice of Life    1        1   \n",
       "19     Action, Mecha, Military, School, Sci-Fi, Super...    2       25   \n",
       "20                        Comedy, Drama, Shounen, Sports    2       75   \n",
       "21     Action, Drama, Historical, Martial Arts, Roman...  OVA        4   \n",
       "22       Action, Adventure, Comedy, Drama, Sci-Fi, Space    2       26   \n",
       "23     Action, Comedy, Parody, Sci-Fi, Seinen, Super ...    2       12   \n",
       "24                            Action, Adventure, Fantasy    1        1   \n",
       "25     Comedy, Mystery, Romance, School, Sci-Fi, Supe...    1        1   \n",
       "26       Comedy, Mystery, Romance, Supernatural, Vampire    2       26   \n",
       "27     Adventure, Fantasy, Historical, Mystery, Seine...    2       10   \n",
       "28     Adventure, Fantasy, Historical, Mystery, Seine...    2       26   \n",
       "29              Action, Adventure, Comedy, Mecha, Sci-Fi    2       27   \n",
       "...                                                  ...  ...      ...   \n",
       "12264                                             Hentai    8        2   \n",
       "12265                                             Hentai    8  Unknown   \n",
       "12266                                             Hentai    8        1   \n",
       "12267                                             Hentai    8        2   \n",
       "12268                         Comedy, Hentai, Historical  OVA        5   \n",
       "12269                                             Hentai    8        1   \n",
       "12270                                             Hentai    8        1   \n",
       "12271                                             Hentai    8        1   \n",
       "12272                             Comedy, Hentai, Parody  OVA        1   \n",
       "12273                             Comedy, Hentai, Parody  OVA        1   \n",
       "12274                                             Hentai    8  Unknown   \n",
       "12275                                             Hentai    8        1   \n",
       "12276                                             Hentai    8        2   \n",
       "12277                                     Comedy, Hentai  OVA        2   \n",
       "12278                              Hentai, Slice of Life  OVA        1   \n",
       "12279                                             Hentai    8        1   \n",
       "12280                                             Hentai    8  Unknown   \n",
       "12281                                             Hentai    8        2   \n",
       "12282                                             Hentai    8  Unknown   \n",
       "12283                                             Hentai    8        1   \n",
       "12284                                             Hentai    8        2   \n",
       "12285                       Demons, Hentai, Supernatural  OVA  Unknown   \n",
       "12286                                             Hentai    8        2   \n",
       "12287                                             Hentai    8        1   \n",
       "12288                                             Hentai    8        1   \n",
       "12289                                             Hentai    8        1   \n",
       "12290                                             Hentai    8        1   \n",
       "12291                                             Hentai    8        4   \n",
       "12292                                             Hentai    8        1   \n",
       "12293                                             Hentai    8        1   \n",
       "\n",
       "       rating  members  \n",
       "0        9.37   200630  \n",
       "1        9.26   793665  \n",
       "2        9.25   114262  \n",
       "3        9.17   673572  \n",
       "4        9.16   151266  \n",
       "5        9.15    93351  \n",
       "6        9.13   425855  \n",
       "7        9.11    80679  \n",
       "8        9.10    72534  \n",
       "9        9.11    81109  \n",
       "10       9.06   456749  \n",
       "11       9.05   102733  \n",
       "12       9.04   336376  \n",
       "13       8.98   572888  \n",
       "14       8.93   179342  \n",
       "15       8.93   466254  \n",
       "16       8.92   416397  \n",
       "17       8.88    75894  \n",
       "18       8.84   226193  \n",
       "19       8.83   715151  \n",
       "20       8.83   157670  \n",
       "21       8.83   129307  \n",
       "22       8.82   486824  \n",
       "23       8.82   552458  \n",
       "24       8.81   339556  \n",
       "25       8.81   240297  \n",
       "26       8.80   205959  \n",
       "27       8.80   101351  \n",
       "28       8.78   300030  \n",
       "29       8.78   562962  \n",
       "...       ...      ...  \n",
       "12264    6.42      254  \n",
       "12265     NaN      205  \n",
       "12266    5.43      262  \n",
       "12267    4.11      174  \n",
       "12268    2.86      111  \n",
       "12269    4.08      164  \n",
       "12270    3.00      147  \n",
       "12271    5.20      240  \n",
       "12272    4.14      186  \n",
       "12273    4.00      146  \n",
       "12274     NaN      392  \n",
       "12275    3.14      108  \n",
       "12276    4.00       66  \n",
       "12277    4.66      176  \n",
       "12278    3.61      138  \n",
       "12279     NaN       79  \n",
       "12280     NaN      240  \n",
       "12281    4.53      221  \n",
       "12282     NaN      195  \n",
       "12283    4.95      112  \n",
       "12284    4.45      118  \n",
       "12285     NaN      485  \n",
       "12286    4.67      148  \n",
       "12287    4.33      201  \n",
       "12288    4.37      166  \n",
       "12289    4.15      211  \n",
       "12290    4.28      183  \n",
       "12291    4.88      219  \n",
       "12292    4.98      175  \n",
       "12293    5.46      142  \n",
       "\n",
       "[12294 rows x 7 columns]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
